package com.woniu.web.controller;

import com.woniu.pojo.PojoUser;

import com.woniu.vo.VoUser;
import com.woniu.web.service.TbJpUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@Api(value = "租赁用户列表")
public class TbJpUserController {

    @Autowired
    private TbJpUserService tbJpUserService;

    @PostMapping("/user/findAll")
    @ApiOperation(value = "用户列表展示", notes = "用户列表展示")
    public List<PojoUser> findAll(@RequestBody VoUser voUser1){
        System.out.println("找到了"+voUser1);
        VoUser voUser=new VoUser();
        voUser.setPhone(86376906L);
        voUser.setUserType(2);
        voUser.setWxSex(1);
        List<PojoUser> pojoUsers = tbJpUserService.selUsers(voUser);
        Map<String,Object> map=new HashMap<>();
        map.put("pojoUsers",pojoUsers);
        map.put("voUser",voUser);
        return pojoUsers;
    }
}
